/***********************************************
 This file is part of redia-bapps-main-ios.
 
 Copyright (c) 2015 Redia A/S
 
 Redia-bapps-main-ios is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.
 
 redia-bapps-main-ios is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with redia-bapps-main-ios.  If not, see <http://www.gnu.org/licenses/>.
 
 *********************************************** */

//
//  BAScanFrontViewController.h
//  redia-bapps-ios
//
//  Created by Henrik Lynbech on 11/11/13.
//  Copyright (c) 2013 redia. All rights reserved.
//

#import <UIKit/UIKit.h>

#ifdef BA_USE_ZBAR_SCANNER
#import "ZBarSDK.h"
#endif

#import "MWFSlideNavigationViewController.h"
#import <AVFoundation/AVCaptureOutput.h>

typedef enum BAScannerCodeTypeKinds {
    BAScannerCodeTypeQRCode,
    BAScannerCodeTypeCode39,
    BAScannerCodeTypeCode128
} BAScannerCodeType;


@protocol BAScannerResultDelegate <NSObject>

-(void)scannerScannedCode:(BAScannerCodeType)codetype value:(NSString*)value;

@end

#ifdef BA_USE_ZBAR_SCANNER
@interface BAScanFrontViewController : UIViewController<ZBarReaderViewDelegate, UIAlertViewDelegate, AVCaptureMetadataOutputObjectsDelegate>
{
    ZBarCameraSimulator *cameraSim;
}
@property (nonatomic, retain) ZBarReaderView *readerView;
#else
@interface BAScanFrontViewController : UIViewController<UIAlertViewDelegate, AVCaptureMetadataOutputObjectsDelegate>
{
}
#endif

@property (weak, nonatomic) IBOutlet UIView *scanContainerView;

@property (nonatomic, weak) id<BAScannerResultDelegate> scannerResultDelegate;
@property (nonatomic) BOOL dontShowUserIntroHelp;

-(void)startScannerScanning;
-(void)stopScannerScanning;
-(void)playSnapShotSound;
@end
